import * as types from '../../mutation-types/promotionLink/index';

const state = {
    innerIndex: '5',
    trend : [],
    promotional : []
};


const mutations = {
    [types.INNER_INDEX](state, {innerIndex}) {
        state.innerIndex = innerIndex || '5';
    },
	[types.TREND] (state , {trend}){
		state.trend = trend;
	},
    [types.TREND_ADD] (state , preload){
        state.trend.push(preload);
    },
    [types.PROMOTIONAL] (state , {promotional}){
        state.promotional = promotional;
    },
    [types.PROMOTIONAL_ADD] (state , preload){
        state.promotional.push(preload);
    }
};

export default {
	state ,
	mutations
};